package petrochina.company.electric.model;

import java.util.List;
import java.util.Objects;

/**
 * 填报区域数据
 */
public class TaskFillAreaData {

    // id
    private long id;
    private String areaName;
    private int status;
    private List<TaskFillStationData> stations;
    private String createTime;
    private boolean isWrite = false;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<TaskFillStationData> getStations() {
        return stations;
    }

    public void setStations(List<TaskFillStationData> stations) {
        this.stations = stations;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public boolean isWrite() {
        return isWrite;
    }

    public void setWrite(boolean write) {
        isWrite = write;
    }

    //    public static Creator<TaskFillAreaData> getCREATOR() {
//        return CREATOR;
//    }
//
//    @Override
//    public int describeContents() {
//        return 0;
//    }
//
//    @Override
//    public void writeToParcel(Parcel dest, int flags) {
//        dest.writeLong(this.id);
//        dest.writeString(this.circuitName);
//        dest.writeInt(this.status);
//        dest.writeString(this.createTime);
//    }
//
//    public void readFromParcel(Parcel source) {
//        this.id = source.readLong();
//        this.circuitName = source.readString();
//        this.status = source.readInt();
//        this.createTime = source.readString();
//    }

    public TaskFillAreaData(long id, String areaName, int status, List<TaskFillStationData> stations, String createTime) {
        this.id = id;
        this.areaName = areaName;
        this.status = status;
        this.stations = stations;
        this.createTime = createTime;
    }

//    protected TaskFillAreaData(Parcel in) {
//        this.id = in.readLong();
//        this.circuitName = in.readString();
//        this.status = in.readInt();
//        this.createTime = in.readString();
//    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof TaskFillAreaData)) return false;
        TaskFillAreaData that = (TaskFillAreaData) o;
        return getId() == that.getId();
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getAreaName(), getStatus(), getStations(), getCreateTime());
    }

//    public static final Creator<TaskFillAreaData> CREATOR = new Creator<TaskFillAreaData>() {
//        @Override
//        public TaskFillAreaData createFromParcel(Parcel source) {
//            return new TaskFillAreaData(source);
//        }
//
//        @Override
//        public TaskFillAreaData[] newArray(int size) {
//            return new TaskFillAreaData[size];
//        }
//    };
}
